<?php

namespace plugin\sqmadmin\app\model\system;

use plugin\sqmadmin\basic\BaseModel;

/**
 * 邮件记录模型
 */
class SysMail extends BaseModel
{
    /**
     * 数据表主键
     * @var string
     */
    protected $pk = 'id';

    protected $table = 'sys_mail';

    public function searchFromAttr($query, $value)
    {
        $query->where('from', 'like', '%' . $value . '%');
    }

    public function searchEmailAttr($query, $value)
    {
        $query->where('email', 'like', '%' . $value . '%');
    }
}